<template>
	<view class="my-search-container">
		<view class="my-search-box" @click="searchBoxHandler">
			<uni-icons type="search" size="18"></uni-icons>
			<text>搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name: "my-search",
		data() {
			return {};
		},
		methods: {
			// 点击了模拟的 input 输入框
			searchBoxHandler() {
				// 触发外界通过 @click 绑定的 click 事件处理函数
				this.$emit('click')
			},

		}
	}
</script>

<style lang="scss">
	.my-search-container {
		background-color: #c00000;
		height: 50px;
		padding: 0 10px;
		display: flex;
		align-items: center;

		.my-search-box {
			background-color: #fff;
			height: 36px;
			width: 100%;
			border-radius: 18px;
			text-align: center;
			line-height: 36px;

			uni-icons {
				margin-right: 5px;
			}
		}
	}
</style>